<script setup lang="ts">
import { ref } from 'vue';
import ZhTree from './components/ZhTree.vue'
// import  ZhTree  from "./components/tree";

const list = ref([
  {
    label: "一级 1",
    children: [
      { label: "二级 1-1", children: [{ label: "三级 1-1-1" }] },
      { label: "二级 1-2" }]
  },
  {
    label: "一级 2"
  }
])

const handleNodeClick = () => {
  // console.log(e);
  list.value[0].label = "4564"
}

// const name = ref("啊啊啊");

// const click = () => {
//   name.value = "叭叭叭";
//   console.log(name.value);
  
// }
</script>

<template>
  <zh-tree :data="list" @node-click="handleNodeClick" />
  <!-- <zh-tree :name="name" @click="click" /> -->
</template>

<style scoped>
</style>
